package com.fzh.Zhanye.model;

import java.sql.Date;

public class Type2 extends BaseModel {
	private String t2Id;
	private String t2Name;
	private Type1 type1;
	public String getT2Id() {
		return t2Id;
	}
	public void setT2Id(String t2Id) {
		this.t2Id = t2Id;
	}
	public String getT2Name() {
		return t2Name;
	}
	public void setT2Name(String t2Name) {
		this.t2Name = t2Name;
	}
	public Type1 getType1() {
		return type1;
	}
	public void setType1(Type1 type1) {
		this.type1 = type1;
	}
	@Override
	public String toString() {
		return "Type2 [t2Id=" + t2Id + ", t2Name=" + t2Name + ", type1=" + type1 + "]";
	}
	public Type2(String creator, Date createTime, String updator, Date updateTime, String remark, String t2Id,
			String t2Name, Type1 type1) {
		super(creator, createTime, updator, updateTime, remark);
		this.t2Id = t2Id;
		this.t2Name = t2Name;
		this.type1 = type1;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result + ((t2Id == null) ? 0 : t2Id.hashCode());
		result = prime * result + ((t2Name == null) ? 0 : t2Name.hashCode());
		result = prime * result + ((type1 == null) ? 0 : type1.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		Type2 other = (Type2) obj;
		if (t2Id == null) {
			if (other.t2Id != null)
				return false;
		} else if (!t2Id.equals(other.t2Id))
			return false;
		if (t2Name == null) {
			if (other.t2Name != null)
				return false;
		} else if (!t2Name.equals(other.t2Name))
			return false;
		if (type1 == null) {
			if (other.type1 != null)
				return false;
		} else if (!type1.equals(other.type1))
			return false;
		return true;
	}
	public Type2() {
		super();
		// TODO Auto-generated constructor stub
	}
	public Type2(String creator, Date createTime, String updator, Date updateTime, String remark) {
		super(creator, createTime, updator, updateTime, remark);
		// TODO Auto-generated constructor stub
	}
	
}
